package cn.xlmdz.subsoilerinfoquery.bean.tree;

import android.view.View;
import android.widget.TextView;

import java.io.File;

import cn.xlmdz.subsoilerinfoquery.R;
import tellh.com.recyclertreeview_lib.TreeNode;
import tellh.com.recyclertreeview_lib.TreeViewBinder;

public class CooperativeNodeBinder extends TreeViewBinder<CooperativeNodeBinder.ViewHolder> {

    @Override
    public ViewHolder provideViewHolder(View itemView) {
        return new ViewHolder(itemView);
    }

    @Override
    public void bindView(ViewHolder holder, int position, TreeNode node) {
        Cooperative cooperativeNode = (Cooperative) node.getContent();
        holder.tvName.setText(cooperativeNode.title);
    }

    @Override
    public int getLayoutId() {
        return R.layout.tree_item_cooperative;
    }

    public class ViewHolder extends TreeViewBinder.ViewHolder {
        public TextView tvName;

        public ViewHolder(View rootView) {
            super(rootView);
            this.tvName = (TextView) rootView.findViewById(R.id.tv_name);
        }

    }
}
